/**
 * @author: yyq
 * @date: 2025年3月19日 13:11:31
 * @description: 
 */
package com.sheepone.monitor.audit;

import java.lang.reflect.Method;

import com.sheepone.monitor.audit.core.entities.AuditLogMessage;

/**
 * @author: yyq
 * @date: 2025年3月19日 13:11:31
 * @description:
 */
public class SceneProcessor {

    private final Object obj;
    private final Method processor;

    public SceneProcessor(Object obj, Method processor) {
        this.obj = obj;
        this.processor = processor;
    }

    public void process(AuditLogMessage message) {
        try {
            processor.invoke(obj, message);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public String getName(){
        return processor.getName();
    }

}
